<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const a = {
            user:'哈哈'
        }

        // const b = a //赋值的是引用地址,改变其一另一个跟着改变
        const b = {...a} //对象复制,互不影响

        b.user = '哇哇'
        console.log(a);
    </script>
</body>
</html>